package com.kotlinvben.exception

class DepartmentNotFoundException(id: Long) : BusinessException(
    code = BusinessErrorCode.NOT_FOUND,
    message = "部门不存在: $id"
)

class DepartmentNameExistsException(name: String) : BusinessException(
    code = BusinessErrorCode.BAD_REQUEST,
    message = "部门名称已存在: $name"
)

class DepartmentParentNotFoundException(parentId: Long) : BusinessException(
    code = BusinessErrorCode.BAD_REQUEST,
    message = "父部门不存在: $parentId"
)

class DepartmentCircularReferenceException(id: Long, parentId: Long) : BusinessException(
    code = BusinessErrorCode.BAD_REQUEST,
    message = "父部门不能与当前部门相同: $id -> $parentId"
) 